<?php

use Faker\Generator as Faker;

$factory->define(App\Model\Travels::class, function (Faker $faker) {
    //sentence() 是 faker 提供的 API ，随机生成『小段落』文本
    $sentence = $faker->sentence();
    // 随机取一个月以内的时间
    $time = $faker->dateTimeThisMonth();
    return [
        'uid' => $faker->numberBetween(1,10),
        'title' => $faker->title,
        'description' => $sentence,
        'content' => $faker->realText($faker->numberBetween(200,500)),
        'img' => $faker->imageUrl($width = 640, $height = 480),
        'banner' => $faker->imageUrl($width = 1200, $height = 480),
        'zan' => $faker->numberBetween(1,500),
        'browse' => $faker->numberBetween(1,2000),
        'created_at' => $time,
        'updated_at' => $time,
    ];
});
